\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fullpage}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{array}
\usepackage{color}
\usepackage{graphicx}
\usepackage{float}
\usepackage[hidelinks]{hyperref}
\usepackage{listings}
\usepackage[margin=2cm]{geometry}
\usepackage{setspace}
\usepackage{natbib}
\usepackage{proof}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{wrapfig}
\usepackage [english]{babel}
\usepackage{grffile}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage[tikz]{bclogo}
\usetikzlibrary{chains}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows}
\usepackage{lscape}
\usepackage [autostyle, english = american]{csquotes}
\usepackage{enumitem}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage{pdfpages}
\usepackage{booktabs}
\usepackage{pgfgantt}
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\bibliographystyle{apsr}
\bibpunct{(}{)}{;}{a}{,}{,}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
\setlength{\tabcolsep}{.18cm}
\usepackage{fancyvrb}
\usepackage{etoc}
\usepackage{sectsty}
\sectionfont{\fontsize{14}{14}\selectfont}
\subsectionfont{\fontsize{12}{12}\selectfont}

% ==Cross Referencing Different Docs
\usepackage{xr}
\externaldocument{EfficacyRole_appendix}

\usepackage{titlesec}

\makeatletter
\@addtoreset{section}{part}
\@addtoreset{figure}{part}
\@addtoreset{table}{part}
\makeatother
\titleformat{\part}[display]
{\normalfont\LARGE\bfseries}{}{0pt}{}

\makeatletter
\renewcommand{\l@section}{\@dottedtocline{1}{1.5em}{2.6em}}
\renewcommand{\l@subsection}{\@dottedtocline{2}{4.0em}{3.6em}}
\renewcommand{\l@subsubsection}{\@dottedtocline{3}{7.4em}{4.5em}}
\makeatother

% === new commands ===
\newcommand\ud{\mathrm{d}}
\newcommand\dist{\buildrel\rm d\over\sim}
\newcommand\ind{\stackrel{\rm indep.}{\sim}}
\newcommand\iid{\stackrel{\rm i.i.d.}{\sim}}
\newcommand\logit{{\rm logit}}
\renewcommand\r{\right}
\renewcommand\l{\left}
\newcommand\Var{{\rm Var}}
\newcommand\var{{\rm var}}
\newcommand\Cov{{\rm Cov}}
\newcommand\E{\mathbb{E}}
\newcommand\V{\mathbb{V}}
\newcommand\cN{\mathcal{N}}
\newcommand\cS{\mathcal{S}}
\newcommand\cX{\mathcal{X}}
\newcommand\wX{\widetilde{X}}
\newcommand{\diag}{\mathop{\mathrm{diag}}}
\newcommand{\argmax}{\operatornamewithlimits{argmax}}
\newcommand{\argmin}{\operatornamewithlimits{argmin}}
\newcommand{\indep}{\mbox{$\perp\!\!\!\perp$}}
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
\DeclareMathOperator{\sgn}{sgn}
\providecommand{\norm}[1]{\lVert#1\rVert}

\def\changemargin#1#2{\list{}{\rightmargin#2\leftmargin#1}\item[]}
\let\endchangemargin=\endlist 

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{P}[1]{>{\raggedright\tabularxbackslash}p{#1}}

\newcounter{myWeekNum} %for gantt
\stepcounter{myWeekNum}
%
\newcommand{\myWeek}{\themyWeekNum
    \stepcounter{myWeekNum}
    \ifnum\themyWeekNum=53
         \setcounter{myWeekNum}{1}
    \else\fi
}

\newenvironment{bluetext}{\color{blue}}{\ignorespacesafterend}


\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{{\Large \bf README for ``Team and Nation: Sports, Nationalism,\\ and Attitudes toward Refugees''}}

\author{Leah Rosenzweig\thanks{Postdoctoral Fellow, Stanford University. E-mail: \href{lrosenzw@stanford.edu}{lrosenzw@stanford.edu}} 
~and Yang-Yang Zhou\thanks{Assistant Professor, Department of Political Science, University of British Columbia. E-mail: \href{yangyang.zhou@ubc.ca}{yangyang.zhou@ubc.ca}}
}

\date{\today}
\maketitle

\section{Instructions for Replicating All Findings}
To replicate all findings, please follow the instructions below. Since the manuscript and appendix are {\tt .Rnw} files with inline code, recompiling the documents also re-run all of the analyses in the manuscript and appendix. 
\begin{enumerate}
\item {\bf Open main analysis file:} in the main replication folder, open {\tt AfricaCup\_Paper\_Final.Rnw} in RStudio. 
	\begin{enumerate}
	\item {\bf Select necessary {\tt knitr} settings:} Once in RStudio, select RStudio -> Preferences -> Sweave from the toolbar. Then, set ``Weave Rnw files using:'' to ``knitr'' in the drop-down menu, and set ``Typeset LaTeX int PDF using:'' to ``XeLaTeX'' in the drop-down menu. Click ``Apply'' at the bottom of the window, and then `OK''.
	\end{enumerate}
\item {\bf Compile main analysis file:} Click ``Compile PDF'' at the top of the RStudio window. This will run all analyses and compile the main manuscript. This should take about 5 minutes. You may run into errors at the final LaTeX compilation stage having to do with citations. This is addressed by pressing ``Compile PDF'' two more times.
\item {\bf Open appendix file:} In the main replication folder folder, open {\tt AfricaCup\_SI.Rnw} in RStudio. 
\item {\bf Compile appendix file:} Click ``Compile PDF'' at the top of the RStudio window. This will run all analyses and compile the main manuscript. This should take about 30 minutes. You may run into errors at the final LaTeX compilation stage having to do with citations. This is addressed by pressing ``Compile PDF'' two more times.
\end{enumerate}

\section{Structure of Replication Archive}
In addition to the README. there are two folders or files in the top level of the replication archive: {\tt data} and {\tt figures}. We provide more detail on the folder structure below.

\begin{enumerate}
\item {\tt data:} A folder containing all of the raw data used in the analysis. This includes a shapefile of Kenya ({\tt ken\_admbnda\_adm1\_iebc\_20180607}), a shapefile of Tanzania ({\tt tza\_admbnda\_adm1\_20181019}), a crosswalk file linking the shapefiles to surveyed regions ({\tt ACUP\_geokey.csv}), and an RData file containing the cleaned and anonymized survey data ({\tt ACUP\_anonymized\_final.RData}).
\item {\tt figures:} A folder containing all of the pdf and png figures used in the text of the main paper and SI.
\end{enumerate}


\section{OS, R, and Package Version Information}
This analysis was compiled using R version 4.0.2, on a Mac OSX running macOS Big Sur 11.1. Additional information on the computing environment, and exact package versions, can be found below.
\begin{verbatim}
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS  10.16
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods  
[8] base     
other attached packages:
 [1] haven_2.3.1         texreg_1.37.5       doMC_1.3.6         
 [4] iterators_1.0.13    foreach_1.5.1       ggmap_3.0.0        
 [7] gpclib_1.5-6        maptools_1.0-1      mapdata_2.3.0      
[10] maps_3.3.0          rgdal_1.5-19        sp_1.4-2           
[13] CBPS_0.21           glmnet_4.0-2        Matrix_1.2-18      
[16] numDeriv_2016.8-1.1 nnet_7.3-14         MatchIt_4.0.1      
[19] MASS_7.3-53         stargazer_5.2.2     kableExtra_1.1.0   
[22] patchwork_1.0.1     gtools_3.8.2        reshape2_1.4.4     
[25] forcats_0.5.0       stringr_1.4.0       dplyr_1.0.1        
[28] purrr_0.3.4         readr_1.3.1         tidyr_1.1.1        
[31] tibble_3.0.4        ggplot2_3.3.2       tidyverse_1.3.0    
[34] foreign_0.8-80      estimatr_0.22.0     knitr_1.29         
loaded via a namespace (and not attached):
 [1] bitops_1.0-6        fs_1.5.0            lubridate_1.7.9    
 [4] webshot_0.5.2       httr_1.4.2          tools_4.0.2        
 [7] backports_1.2.1     R6_2.5.0            DBI_1.1.0          
[10] colorspace_2.0-0    withr_2.3.0         tidyselect_1.1.0   
[13] compiler_4.0.2      cli_2.2.0           rvest_0.3.6        
[16] xml2_1.3.2          scales_1.1.1        digest_0.6.27      
[19] rmarkdown_2.3       jpeg_0.1-8.1        pkgconfig_2.0.3    
[22] htmltools_0.5.0     dbplyr_1.4.4        rlang_0.4.9        
[25] readxl_1.3.1        rstudioapi_0.13     shape_1.4.5        
[28] generics_0.0.2      jsonlite_1.7.2      magrittr_2.0.1     
[31] Formula_1.2-3       Rcpp_1.0.5          munsell_0.5.0      
[34] fansi_0.4.1         lifecycle_0.2.0     stringi_1.4.6      
[37] yaml_2.2.1          plyr_1.8.6          grid_4.0.2         
[40] blob_1.2.1          crayon_1.3.4        lattice_0.20-41    
[43] splines_4.0.2       hms_0.5.3           pillar_1.4.7       
[46] rjson_0.2.20        codetools_0.2-16    reprex_0.3.0       
[49] glue_1.4.2          evaluate_0.14       modelr_0.1.8       
[52] png_0.1-7           vctrs_0.3.5         RgoogleMaps_1.4.5.3
[55] cellranger_1.1.0    gtable_0.3.0        assertthat_0.2.1   
[58] xfun_0.16           broom_0.7.0         survival_3.1-12    
[61] viridisLite_0.3.0   ellipsis_0.3.1
\end{verbatim}

\end{document}